<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="az137232">CREATE TEXT SEARCH CONFIGURATION</title><body><p id="sql_command_desc">Defines a new text search configuration.</p><section id="section2"><title>Synopsis</title>
      <codeblock id="sql_command_synopsis">CREATE TEXT SEARCH CONFIGURATION <varname>name</varname> (
    PARSER = <varname>parser_name</varname> |
    COPY = <varname>source_config</varname>
)</codeblock></section><section id="section3"><title>Description</title>
      <p><codeph>CREATE TEXT SEARCH CONFIGURATION</codeph> creates a new text search configuration.
        A text search configuration specifies a text search parser that can divide a string into
        tokens, plus dictionaries that can be used to determine which tokens are of interest for
        searching.</p>
      <p>If only the parser is specified, then the new text search configuration initially has no
        mappings from token types to dictionaries, and therefore will ignore all words. Subsequent
          <codeph>ALTER TEXT SEARCH CONFIGURATION</codeph> commands must be used to create mappings
        to make the configuration useful. Alternatively, an existing text search configuration can
        be copied.</p>
      <p>If a schema name is given then the text search configuration is created in the specified
        schema. Otherwise it is created in the current schema.</p>
      <p>The user who defines a text search configuration becomes its owner.</p>
      <p>Refer to  <xref href="../../admin_guide/textsearch/full-text-search.html#full-text-search" format="html" scope="external">Using Full Text Search</xref>
        for further information.</p></section><section id="section4"><title>Parameters</title>
      <parml>
        <plentry>
          <pt><varname>name</varname></pt>
          <pd>The name of the text search configuration to be created. The name can be
            schema-qualified.</pd>
        </plentry>
        <plentry>
          <pt><varname>parser_name</varname></pt>
          <pd>The name of the text search parser to use for this configuration.</pd>
        </plentry>
        <plentry>
          <pt><varname>source_config</varname></pt>
          <pd>The name of an existing text search configuration to copy.</pd>
        </plentry>
      </parml>
   </section>
  <section id="section9">
    <title>Notes</title>
    <p>The <codeph>PARSER</codeph> and <codeph>COPY</codeph> options are mutually exclusive, because when an existing configuration is copied, its parser selection is copied too.</p> 
  </section>
  <section id="section6"><title>Compatibility</title><p>There is no <codeph>CREATE TEXT SEARCH CONFIGURATION</codeph> statement in the SQL standard.</p></section><section id="section7"><title>See Also</title><p><codeph id="codeph_qcn_twd_mfb"><xref href="ALTER_TEXT_SEARCH_CONFIGURATION.xml#topic1"
          /></codeph>, <codeph id="codeph_e3b_xwd_mfb"><xref
            href="DROP_TEXT_SEARCH_CONFIGURATION.xml#topic1"/></codeph></p></section></body></topic>
